﻿using Dapper;
using System;
using BCEntity.Trading.Purchase.GoodsPurchaseChecklist;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;

namespace BCData.Trading.Purchase.GoodsPurchaseChecklist
{
    /// <summary>
    /// 商品采购清单
    /// </summary>
    public interface IGoodsPurchaseChecklistData
    {
        #region  成员方法
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="goodsPurchaseChecklistId">商品采购清单Id</param>
        Task<bool> Exists(long goodsPurchaseChecklistId);
        /// <summary>
        /// 该记录是否存在此采购项
        /// </summary>
        /// <param name="goodsPurchaseItemId">商品采购清单Id</param>
        Task<bool> PurchaseItemExists(long goodsPurchaseItemId);
        /// <summary>
        /// 增加商品采购清单
        /// </summary>
        /// <param name="entity">商品采购清单信息</param>
        Task<GoodsPurchaseChecklistEntity> Add(GoodsPurchaseChecklistEntity entity);
        /// <summary>
        /// 更新商品采购清单
        /// </summary>
        /// <param name="entity">商品采购清单信息</param>
        Task<GoodsPurchaseChecklistEntity> Update(GoodsPurchaseChecklistEntity entity);
        /// <summary>
        /// 删除商品采购清单
        /// </summary>
        /// <param name="goodsPurchaseChecklistId">商品采购清单Id</param>
        Task<bool> Delete(long goodsPurchaseChecklistId);
        /// <summary>
        /// 获取商品采购清单
        /// </summary>
        /// <param name="goodsPurchaseChecklistId">商品采购清单Id</param>
        Task<GoodsPurchaseChecklistEntity> GetEntity(long goodsPurchaseChecklistId);
        /// <summary>
        /// 获取商品采购清单列表
        /// </summary>
        /// <param name="goodsPurchaseId">商品采购单Id</param>
        Task<IEnumerable<GoodsPurchaseChecklistEntity>> GetList(long goodsPurchaseId);
        /// <summary>
        /// 获取商品采购清单分页列表
        /// </summary>
        /// <param name="goodsPurchaseId">商品采购单Id</param>
        /// <param name="categoryName">商品分类名称</param>
        /// <param name="goodsName">商品名称</param>
        /// <param name="sku">商品SKU</param>
        /// <param name="vendorName">供应商名称</param>
        /// <param name="adminName">创建人姓名</param>
        /// <param name="adminId">创建人Id</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="sortName">排序字段</param>
        /// <param name="ascending">升序</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        Task<(IEnumerable<GoodsPurchaseChecklistEntity>, int)> Query(long? goodsPurchaseId, string categoryName, string goodsName, string sku, string vendorName, string adminName, long? adminId, DateTime? start, DateTime? end, string sortName, bool? ascending, int pageIndex, int pageSize);
        #endregion  成员方法
    }


}